<template>
    <div>

        <el-button @click="drawer = true" type="primary" style="margin-left: 16px;">
            弹出管理台
        </el-button>

        <el-button type="primary" icon="el-icon-loading" @click=turnToLogOut>退出</el-button>



        <el-drawer
                title="管理台"
                :visible.sync="drawer"
        >
            <el-row>
                <el-popconfirm title="访问的是同一个网站，确定吗？">
                    <el-button @click=turnToAdUser slot="reference" type="primary" round>用户管理</el-button>
                </el-popconfirm>
            </el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row>
                <el-popconfirm title="访问的是同一个网站，确定吗？">
                    <el-button @click=turnToWarticle slot="reference" type="success" round>发布文章</el-button>
                </el-popconfirm>
            </el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row>
                <el-popconfirm title="访问的是同一个网站，确定吗？">
                    <el-button @click=turnToAdarticle slot="reference" type="info" round>管理文章</el-button>
                </el-popconfirm>
            </el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row>
                <el-popconfirm title="访问的是同一个网站，确定吗？">
                    <el-button @click=turnToAdMessage slot="reference" type="warning" round>管理留言板</el-button>
                </el-popconfirm>
            </el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row>
                <el-popconfirm title="访问的是同一个网站，确定吗？">
                    <el-button @click=turnToAdForum slot="reference" type="danger" round>管理论坛</el-button>
                </el-popconfirm>
            </el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row><i class="el-icon-minus"></i></el-row>
            <el-row>
                <el-popconfirm title="访问的是同一个网站，确定吗？">
                    <el-button @click=turnToAdIndex slot="reference" round>回到主页</el-button>
                </el-popconfirm>
            </el-row>


        </el-drawer>
    </div>
</template>

<script>
    export default {
        methods:{

            turnToAdUser(){
                this.$router.push('/admin/aduser').catch(error=>error)
            },
            turnToWarticle(){
                this.$router.push('/admin/warticle').catch(error=>error)
            },
            turnToAdarticle(){
                this.$router.push('/admin/adarticle').catch(error=>error)
            },
            turnToAdMessage(){
                this.$router.push('/admin/admessage').catch(error=>error)
            },
            turnToAdForum(){
                this.$router.push('/admin/adForum').catch(error=>error)
            },
            turnToAdIndex(){
                this.$router.push('/admin/adindex').catch(error=>error)
            },
            turnToLogOut(){
                this.$router.push('/admin/adlogin').catch(error=>error)
            }
        },
        data() {
            return {
                drawer: false,
            };
        }
    };
</script>